home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 September
/
Ahoy_Magazine_86-09_1986_Double_L.d64
/
Generic Game 1
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
292b
|
10 lines
0 poke 53280,2: poke 53281,2
1 rem commodares problem #29-2:
2 rem generic game
3 rem solution by
4 rem mark breault
5 rem
10 r%=rnd(1)*10+48:fori=1ton:on-(q(i)=r%)goto10:next:n=n+1:q(n)=r%:ifn<4goto10
20 inputa$:n=0:p=0:fori=1to4:forj=1to4:ifq(i)=asc(mid$(a$,j))thenn=n+1:p=p-(i=j)
30 nextj,i:k=k+1:print"[145]",n","p,k:ifp<4goto20